﻿using System;
using System.Collections.Generic;

using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace lcmyjobs.Web.enprise
{
    public partial class CheckNameAjax : BasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            Response.Clear();
            if (Request.Form["t"] != null && Request.Form["name"] != null)
            {
                if (Request.Form["bid"] != null)//更改时所用的检查方法
                {
                    string i = Request.Form["t"];
                    string uname = Request.Form["name"];
                    string bid = Request.Form["bid"];
                    lcmyjobs.BLL.enterprise_basic bs = new BLL.enterprise_basic();
                    if (!bs.Exists(uname,bid, i))
                    {
                        Response.Write("1");
                    }
                    else
                    {
                        Response.Write("0");
                    }
                }
                else
                {
                    string i = Request.Form["t"];
                    string uname = Request.Form["name"];
                    lcmyjobs.BLL.enterprise_basic bs = new BLL.enterprise_basic();
                    if (!bs.Exists(uname, i))
                    {
                        Response.Write("1");
                    }
                    else
                    {
                        Response.Write("0");
                    }
                }
               
            }
            else
            {
                Response.Write("0");
            }
            Response.End();

        }
    }
}